<?php
$this->pageTitle = 'Manage backend users';
$this->menu = array(
    array('label' => Yii::t('app', 'Create') . ' ' . $model->label(), 'url' => array('create')),
);
?>
<script type="text/javascript">
    function ChangeStatus(id, status)
    {  
      	
        $.ajax({
            url: "<?php echo $statusChangeUrl; ?>",   
            type: "post", 
            data: "id=" + id + "&status=" + status, 
            dataType:"html",
		
            success: function(msg){
                $('#tbl-backend-user-grid').yiiGridView.update('tbl-backend-user-grid');
               
            }
        }); 
  
    } 


</script>


<h3>Here manage backend users ! </h3>

<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'tbl-backend-user-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
       // 'username',
        'email',
        array(
            'name' => 'status',
            'type' => 'raw',
           'value' => 'changeStatusIngridView($data)',
            'filter' => array('0' => Yii::t('app', 'Inactive'), '1' => Yii::t('app', 'Active')),
        ),
        array(
            'header' => 'Review and Rating',
            'value' => 'Users::getTrainerbackProfileReview($data->id)',
            'type' => 'raw',
            'filter' => false,
        ),
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>